home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Tools / Win95 Secrets / SETUP.Z / THREADDB.H < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-19  |  3.8 KB  |  148 lines

  1. //==================================
  2. // WIN32WLK - Matt Pietrek 1995
  3. // FILE: THREADDB.H
  4. //==================================
  5. #pragma pack(1)
  6.  
  7. #include "tib.h"
  8. #include "tdbx.h"
  9.  
  10. typedef struct _THREAD_DATABASE
  11. {
  12. DWORD   Type;               // 00h
  13.  
  14. DWORD   cReference;         // 04h
  15.  
  16. PPROCESS_DATABASE pProcess; // 08h
  17.  
  18. DWORD   someEvent;          // 0Ch An event object (What's it used for???)
  19.  
  20. DWORD   pvExcept;           // 10h This field through field 3CH is a TIB
  21.                             //      structure (see TIB.H)
  22.                                 
  23. DWORD   TopOfStack;         // 14h
  24.  
  25. DWORD   StackLow;           // 18h
  26.  
  27. WORD    W16TDB;             // 1Ch
  28.  
  29. WORD    StackSelector16;    // 1Eh Used when thunking down to 16 bits
  30.  
  31. DWORD   SelmanList;         // 20h
  32.  
  33. DWORD   UserPointer;        // 24h
  34.  
  35. PTIB    pTIB;               // 28h
  36.  
  37. WORD    TIBFlags;           // 2Ch  TIBF_WIN32 = 1, TIBF_TRAP = 2
  38.  
  39. WORD    Win16MutexCount;    // 2Eh
  40.  
  41. DWORD   DebugContext;       // 30h
  42.  
  43. PDWORD  pCurrentPriority;   // 34h
  44.  
  45. DWORD   MessageQueue;       // 38h
  46.  
  47. DWORD   pTLSArray;          // 3Ch
  48.  
  49. PPROCESS_DATABASE pProcess2;// 40h Another copy of the thread's process???
  50.  
  51. DWORD   Flags;              // 44h
  52.                             // 0x00000001 - fCreateThreadEvent
  53.                             // 0x00000002 - fCancelExceptionAbort
  54.                             // 0x00000004 - fOnTempStack
  55.                             // 0x00000008 - fGrowableStack
  56.                             // 0x00000010 - fDelaySingleStep
  57.                             // 0x00000020 - fOpenExeAsImmovableFile
  58.                             // 0x00000040 - fCreateSuspended
  59.                             // 0x00000080 - fStackOverflow
  60.                             // 0x00000100 - fNestedCleanAPCs
  61.                             // 0x00000200 - fWasOemNowAnsi
  62.                             // 0x00000400 - fOKToSetThreadOem
  63.  
  64. DWORD   TerminationStatus;  // 48h Returned by GetExitCodeThread
  65.  
  66. WORD    TIBSelector;        // 4Ch
  67.  
  68. WORD    EmulatorSelector;   // 4Eh
  69.  
  70. DWORD   cHandles;           // 50h
  71.  
  72. DWORD   WaitNodeList;       // 54h
  73.  
  74. DWORD   un4;                // 58h
  75.  
  76. DWORD   Ring0Thread;        // 5Ch
  77.  
  78. PTDBX   pTDBX;              // 60
  79.  
  80. DWORD   StackBase;          // 64h
  81.  
  82. DWORD   TerminationStack;   // 68h
  83.  
  84. DWORD   EmulatorData;       // 6Ch
  85.  
  86. DWORD   GetLastErrorCode;   // 70h
  87.  
  88. DWORD   DebuggerCB;         // 74h
  89.  
  90. DWORD   DebuggerThread;     // 78h
  91.  
  92. PCONTEXT    ThreadContext;  // 7Ch  // register context defined in WINNT.H
  93.  
  94. DWORD   Except16List;       // 80h
  95.  
  96. DWORD   ThunkConnect;       // 84h
  97.  
  98. DWORD   NegStackBase;       // 88h
  99.  
  100. DWORD   CurrentSS;          // 8Ch
  101.  
  102. DWORD   SSTable;            // 90h
  103.  
  104. DWORD   ThunkSS16;          // 94h
  105.  
  106. DWORD   TLSArray[64];       // 98h
  107.  
  108. DWORD   DeltaPriority;      // 198h
  109.  
  110. // The retail version breaks off somewhere around here.
  111. // All the remaining fields are most likely only in the debug version
  112.  
  113. DWORD   un5[7];             // 19Ch
  114.  
  115. DWORD   pCreateData16;      // 1B8h
  116.  
  117. DWORD   APISuspendCount;    // 1BCh # of times SuspendThread has been called
  118.  
  119. DWORD   un6;                // 1C0h
  120.  
  121. DWORD   WOWChain;           // 1C4h
  122.  
  123. WORD    wSSBig;             // 1C8h
  124.  
  125. WORD    un7;                // 1CAh
  126.  
  127. DWORD   lp16SwitchRec;      // 1CCh
  128.  
  129. DWORD   un8[6];             // 1D0h
  130.  
  131. DWORD   pSomeCritSect1;     // 1E8h
  132.  
  133. DWORD   pWin16Mutex;        // 1ECh
  134.  
  135. DWORD   pWin32Mutex;        // 1F0h
  136.  
  137. DWORD   pSomeCritSect2;     // 1F4h
  138.  
  139. DWORD   un9;                // 1F8h
  140.  
  141. DWORD   ripString;          // 1FCh
  142.  
  143. DWORD   LastTlsSetValueEIP[64]; // 200h (parallel to TlsArray, contains EIP
  144.                                 //      where TLS value was last set from)
  145.                                             
  146. } THREAD_DATABASE, *PTHREAD_DATABASE;
  147. #pragma pack()
  148.